﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Domain;

namespace Clannan.Models.JsonModel
{
    public class MobilePageJsonModel
    {
        private int id;

        public int ID
        {
            get { return id; }
            set { id = value; }
        }
        private string name;

        public string Name
        {
            get { return name; }
            set { name = value; }
        }
        private string content;

        public string Content
        {
            get { return content; }
            set { content = value; }
        }
        private DateTime createtime;

        public DateTime CreateTime
        {
            get { return createtime; }
            set { createtime = value; }
        }
        private DateTime updatetime;

        public DateTime UpdateTime
        {
            get { return updatetime; }
            set { updatetime = value; }
        }

        /// <summary>
        /// 将对象复制给JsonModel类，防止序列化时会出现重复引用
        /// </summary>
        public MobilePageJsonModel Copy(MobilePageJsonModel mobilepageJsonModel, MobilePage mobilepage)
        {
            mobilepageJsonModel.ID = mobilepage.ID;
            mobilepageJsonModel.Name = mobilepage.Name;
            mobilepageJsonModel.Content = mobilepage.Content;
            mobilepageJsonModel.CreateTime = mobilepage.CreateTime;
            mobilepageJsonModel.UpdateTime = mobilepage.UpdateTime;
            return mobilepageJsonModel;
        }
    }

}